package com.labor.job;

import com.labor.job.config.WorkerContext;
import com.labor.job.exception.WorkerException;

public interface JobFlow {
	
	/**
	 * @Name: beforeWorker
	 * @Description: 
	 *			工作准备逻辑
	 * @param context
	 * @throws WorkerException
	 */
	public void beforeWorker(WorkerContext context) throws WorkerException;
	
	/**
	 * @Name: doWorker
	 * @Description: 
	 *			具体的工作执行逻辑
	 * @param context
	 * @throws WorkerException
	 */
	public void doWorker(WorkerContext context) throws WorkerException;
	
	/**
	 * @Name: afterWorker
	 * @Description: 
	 *			工作收尾逻辑
	 * @param context
	 * @throws WorkerException
	 */
	public void afterWorker(WorkerContext context) throws WorkerException;

}
